import React, { Component } from 'react'
//import {withRouter} from "react-router-dom"
import withRouter from '../util/withRouter'
 class MyHeader extends Component {
    goBack(){  // 要想实现返回功能组件里得有路由信息
         console.log(this.props.router.history.go(-1));
    }
  render() {
    return (
      <div>
          <span onClick={this.goBack.bind(this)}>返回</span>
      </div>
    )
  }
}

export default withRouter(MyHeader)